set

abstract fun set(cookie: Cookie)

Sets the cookie.

This method expects that each cookie attribute in the given cookie is well-formed.

Please note that Chromium may modify some of the cookie attributes (such as domain or expiration time).

Important: this method makes the cookie changes in memory. To keep these changes for the persistent cookies after the application restart invoke the persist method before the application exit.

Parameters

cookie

a cookie to set

Throws

when the cookie can't be set

when the profile is deleted or its engine is closed